<# var conversions = item.get('data')[ThriveQuizB.event_types.conversion]? item.get('data')[ThriveQuizB.event_types.conversion]: 0,
	impressions = item.get('data')[ThriveQuizB.event_types.impression]? item.get('data')[ThriveQuizB.event_types.impression]: 0,
	skip_optin = item.get('data')[ThriveQuizB.event_types.skip_optin]? item.get('data')[ThriveQuizB.event_types.skip_optin]: 0;
	total = item.get('total')? item.get('total'): 0;
#>
<div class="tqb-flow-section-title tvd-col tvd-l2 tvd-m2">
	<# if(item.get('type')=='splash') { #>
		<p><?php echo __( 'Splash Page', 'thrive-quiz-builder' ) ?></p>
	<# } #>
	<# if(item.get('type')=='qna') { #>
		<p><?php echo __( 'Quiz Questions', 'thrive-quiz-builder' ) ?></p>
	<# } #>
	<# if(item.get('type')=='optin') { #>
		<p><?php echo __( 'Opt-In-Gate', 'thrive-quiz-builder' ) ?></p>
		<# if(item.get('subscribers')) { #>
			<p class="tqb-subscribers-info">
				<#= item.get('subscribers') #> <?php echo __( 'Subscribers', 'thrive-quiz-builder' ) ?>
			</p>
		<# } #>
	<# } #>
	<# if(item.get('type')=='results') { #>
		<# if( item.get( 'results_page' ).get('type') === 'url' ) { #>
			<p><?php echo __( 'Redirect', 'thrive-quiz-builder' ) ?></p>
		<# } else { #>
			<p><?php echo __( 'Results Page', 'thrive-quiz-builder' ) ?></p>
		<# } #>
		<div style="display: <#= item.get( 'results_page' ).get( 'type' ) === 'url' ? 'none' : 'block' #>">
			<# if(item.get('subscribers')) { #>
				<span class="tqb-subscribers-info">
					<#= item.get('subscribers') #> <?php echo __( 'Subscribers', 'thrive-quiz-builder' ) ?>
				</span>
			<# } #>

			<# if(item.get('social_shares')) { #>
				<span class="tqb-social-shares">
					<#= item.get('social_shares') #> <?php echo __( 'Shares', 'thrive-quiz-builder' ) ?>
				</span>
			<# } #>
		</div>
	<# } #>
</div>
<# if( impressions ) { #>
<div class="tqb-bar-holder tvd-col tvd-l8 tvd-m8">

	<div class="tqb-drop-off-bar" style="width: <#= total ? ( impressions * 100 / total ).toFixed(2): 0  #>%">

		<div class="tqb-move-on-bar" style="width:<#= impressions ? ( ( conversions ) * 100 / impressions ).toFixed(2) : (0).toFixed(2) #>%">
			<div class="tqb-bar-spacing"></div>
			<# if( skip_optin ) { #>
				<div class="tqb-skipped-bar" style="width: <#= ( skip_optin * 100 / impressions ).toFixed(2) #>%"><div class="tqb-skipped-spacing"></div></div>
			<# } #>
		</div>

		<div class="tqb-progress-number-left"><#= conversions #> </div>
		<div class="tqb-progress-number-right"><#= impressions - conversions #> </div>
		<div class="tqb-bar-arrow">
			<span><#= ( impressions && impressions !== '0' ) ? ( conversions * 100 / impressions ).toFixed(2) : 0 #>%</span>
		</div>

	</div>
	<p class="tqb-flow-section-info" id="tqb-total-number">
		<#= impressions #>
		<span><?php echo __( 'visitors', 'thrive-quiz-builder' ) ?></span>
	</p>

</div>


<div class="tqb-flow-section-info tvd-col tvd-l2 tvd-m2">

	<img src="../wp-content/plugins/thrive-quiz-builder/assets/css/admin/images/arrows.png" alt="arrows" class="tqb-reports-arrows">
	<div class="tqb-dropped-off-container">
		<span>
			<#= ( impressions && impressions !== '0' ) ? ( ( impressions - conversions ) * 100 / impressions ).toFixed(2) : 0 #>%
		</span>

		<span>
			<?php echo __( 'Dropped Off', 'thrive-quiz-builder' ) ?>
		</span>
		<# if(item.get('type')=='optin') { #>
			<p class="tqb-dropped-off-visitors">
				<#= skip_optin #></#> <?php echo __( 'skipped this step', 'thrive-quiz-builder' ) ?>
			</p>
		<# } #>
	</div>

</div>
<# } else { #>
	<div class="tvd-col tvd-l10 tvd-m12 tqb-no-data-reports">
		<p><?php echo __( 'No data', 'thrive-quiz-builder' ) ?></p>
	</div>
<# } #>
